//
//  PBHomeTypeView.m
//  PBHomeDemo
//
//  Created by Playboy on 2018/1/8.
//  Copyright © 2018年 tmkj. All rights reserved.
//

#import "PBHomeTypeView.h"
#import "PBRentTypeController.h"
#import "PBLifeServeController.h"

@interface PBHomeTypeView ()
@property (weak, nonatomic) IBOutlet UIView *firstView;
@property (weak, nonatomic) IBOutlet UIView *secView;
@property (weak, nonatomic) IBOutlet UIView *threeView;
@property (weak, nonatomic) IBOutlet UIView *fourView;
@property (strong, nonatomic) IBOutlet UIView *fiveView;
@end

@implementation PBHomeTypeView

- (void)drawRect:(CGRect)rect {
    UITapGestureRecognizer *firstTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(firsttapMethod)];
    [self.firstView addGestureRecognizer:firstTap];
    UITapGestureRecognizer *secTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(secTapMethod)];
    [self.secView addGestureRecognizer:secTap];
    UITapGestureRecognizer *threeTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(threeTapMethod)];
    [self.threeView addGestureRecognizer:threeTap];
    UITapGestureRecognizer *fourTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(fourTapMethod)];
    [self.fourView addGestureRecognizer:fourTap];
    UITapGestureRecognizer *fiveTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(fiveTapMethod)];
    [self.fiveView addGestureRecognizer:fiveTap];
}

- (void)firsttapMethod {
    PBRentTypeController *vc = [[PBRentTypeController alloc] init];
    vc.type = 1;
    vc.hidesBottomBarWhenPushed = YES;
    [self.jumpVC.navigationController pushViewController:vc animated:YES];
}
- (void)secTapMethod {
    PBRentTypeController *vc = [[PBRentTypeController alloc] init];
    vc.type = 2;
    vc.hidesBottomBarWhenPushed = YES;
    [self.jumpVC.navigationController pushViewController:vc animated:YES];
}
- (void)threeTapMethod {
    PBRentTypeController *vc = [[PBRentTypeController alloc] init];
    vc.type = 4;
    vc.hidesBottomBarWhenPushed = YES;
    [self.jumpVC.navigationController pushViewController:vc animated:YES];
}
- (void)fourTapMethod {
    PBRentTypeController *vc = [[PBRentTypeController alloc] init];
    vc.type = 3;
    vc.hidesBottomBarWhenPushed = YES;
    [self.jumpVC.navigationController pushViewController:vc animated:YES];
}
- (void)fiveTapMethod {
    PBLifeServeController *vc = [[PBLifeServeController alloc] init];
    vc.hidesBottomBarWhenPushed = YES;
    vc.type = 1;
    [self.jumpVC.navigationController pushViewController:vc animated:YES];
}
@end
